﻿using JESAI.EventBus.Attributes;
using JESAI.EventBus.Contexts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace JESAI.EventBus.SubscribeManagers
{
    public interface IEventSubscribeManager
    {
        Task Subscribe(string eventId, Func<EventExecutingContext, Task> handler, EventSubscribeAttribute attribute = default, MethodInfo handlerMethod = default, CancellationToken cancellationToken = default);

        Task Unsubscribe(string eventId, CancellationToken cancellationToken = default);
    }
}
